import { TableNameSpace } from '../variables.scss'

export const tableNamespace = TableNameSpace

export const tableColumnMixWidth = 120
export const tableColumnAlign = 'left'

/** @type {import('vxe-table').GridPagerConfig} */
export const tablePageConfig = {
  pageSize: 30,
  align: 'right',
  pageSizes: [10, 20, 30, 50, 100, 200, 500],
  layouts: [
    'Sizes',
    'PrevJump',
    'PrevPage',
    'Number',
    'NextPage',
    'NextJump',
    'FullJump',
    'Total'
  ]
}

/** @type {import('vxe-table').GridProxyConfig} */
export const tableProxyConfig = {
  props: {
    list: 'rows',
    result: 'data',
    total: 'total'
  }
}

export const tablePopperConfig = {
  placement: 'right',
  modifiers: [
    {
      name: 'offset',
      options: {
        offset: [0, 25]
      }
    }
  ]
}

export const globalConfig = {
  zIndex: 3000,
  tooltipConfig: {
    zIndex: 3000
  },
  icon: {
    TABLE_TREE_OPEN: 'el-icon-arrow-down',
    TABLE_TREE_CLOSE: 'el-icon-arrow-right',
    TABLE_EXPAND_OPEN: 'el-icon-arrow-down',
    TABLE_EXPAND_CLOSE: 'el-icon-arrow-right'
  }
}
